Virtual machine trigger

ABSTRACT

A computing system includes a parent partition, child partitions, a hypervisor, shared memories each associated with one of the child partitions, and trigger pages each associated with one of the child partitions. The hypervisor receives a system event signal from one of the child partitions and, in response to receiving the system event signal, accesses the trigger page associated with that child partition. The hypervisor determines whether the trigger page indicates whether data is available to be read from the shared memory associated with the child partition. The hypervisor can send an indication to either the parent partition or the child partitions that data is available to be read from the shared memory associated with the child partition if the hypervisor determines that the trigger page indicates that data is available to be read from the shared memory associated with the child partition.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.14/719,312, filed May 21, 2015, which is a continuation of U.S. patentapplication Ser. No. 13/090,739, filed Apr. 20, 2011, now U.S. Pat. No.9,043,562, issued on May 26, 2015, the entire contents of which areincorporated herein by reference.

BACKGROUND

In a virtualization environment virtualizing software (typically calleda hypervisor or virtual machine monitor) is installed on the computersystem. The hypervisor multiplexes processors and memory among each ofplurality of virtual machine partitions. In some virtualization systems,one of the virtual machine partitions can be a parent partition whichhas access to hardware devices and can virtualize hardware requests ofthe other virtual machine partitions.

In order for the parent partition to virtualize hardware requests of theother virtual machine partitions, data is passed between the parentpartition and each of the child partitions. In some instances, sharedmemories can be used by child partitions to facilitate communicationbetween a parent partition and the child partitions. A system that isused to communicate between partitions is sometimes referred to as avirtual machine bus system.

One difficulty with virtual machine systems is that, when one partitionwrites data to a shared memory, another partition does not know thatdata has been written to the shared memory. One simple solution to thisissue is to have both the parent partition and child partition regularlycheck the shared memory. However, constant checking of shared memoriesconsumes a lot of processing resources and is inefficient.

SUMMARY

The inventions relate to passing data between virtual machinepartitions. In one embodiment, a computing system includes a parentpartition, child partitions, a hypervisor, shared memories eachassociated with one of the child partitions, and trigger pages eachassociated with one of the child partitions. The hypervisor receives asystem event signal from one of the child partitions and, in response toreceiving the system event signal, accesses the trigger page associatedwith that child partition. The hypervisor determines whether the triggerpage indicates that data is available to be read from the shared memoryassociated with that child partition. The hypervisor can send anindication to the parent partition that data is available to be readfrom the shared memory associated with the child partition if thehypervisor determines that the trigger page indicates that data isavailable to be read by the parent partition. The hypervisor can alsosend an indication to the child partition that data is available to beread from the shared memory associated with the child partition if thehypervisor determines that the trigger page indicates that data isavailable to be read by the parent partition.

In another aspect of the present application, each child partitionwrites data to the shared memory associated with the child partitionbefore sending the system event to the hypervisor. The child partitionaccesses an output portion of the trigger page associated with the childpartition after writing the data to the shared page and determineswhether the output portion indicates that data is available in theshared memory to be read by the parent partition. If the output portiondoes not indicate that data is available in the shared memory to be readby the parent partition, the child partition modifies the output portionto indicate that data is available in the shared memory to be read bythe parent partition.

In another aspect of the present application, the hypervisor isconfigured to access the trigger pages based on an intercept in thehypervisor, such as a hypervisor-initiated time slice intercept. In yetanother aspect of the present application, the hypervisor is configuredto identifies certain trigger events in the computing system. Uponidentifying a trigger event, the hypervisor accesses each of the triggerpages to determine if any shared memory contains data which is availableto be read by the parent partition or any of the child partitions. Ifany of the trigger pages indicate that data is available to be read inany of the shared memories, the hypervisor sends an indication to theappropriate partition that data is available to be read by thepartition.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts a block diagram of a computer system.

FIG. 2 depicts a block diagram of an exemplary architecture for avirtualizing software program.

FIG. 3 depicts a block diagram of an alternative architecture for avirtualizing software program.

FIG. 4 depicts a system and method for communicating data betweenvirtual machine partitions using synthetic intercept signals.

FIG. 5 depicts a system and method for communicating data betweenvirtual machine partitions using a set of monitor pages.

FIG. 6 depicts a system and method for communicating data betweenvirtual machine partitions using trigger pages.

FIG. 7 depicts a method of using a trigger page to notify a virtualmachine partition when data is available to read from a shared memory.

FIG. 8 depicts a method of writing data to a shared memory using atrigger page to signal that data is available to be read from the sharedmemory.

FIG. 9 depicts a method of using a trigger page to notify a virtualmachine partition when data is available to read from a shared memory.

DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

Embodiments of the invention may execute on one or more computersystems. FIG. 1 and the following discussion are intended to provide abrief general description of a suitable computing environment in whichembodiments of the invention may be implemented.

FIG. 1 depicts an example general purpose computing system. The generalpurpose computing system may include a conventional computer 20 or thelike, including processing unit 21. Processing unit 21 may comprise oneor more processors, each of which may have one or more processing cores.A multi-core processor, as processors that have more than one processingcore are frequently called, comprises multiple processors containedwithin a single chip package.

Computer 20 may also comprise graphics processing unit (GPU) 90. GPU 90is a specialized microprocessor optimized to manipulate computergraphics. Processing unit 21 may offload work to GPU 90. GPU 90 may haveits own graphics memory, and/or may have access to a portion of systemmemory 22. As with processing unit 21, GPU 90 may comprise one or moreprocessing units, each having one or more cores.

Computer 20 may also comprise a system memory 22, and a system bus 23that communicative couples various system components including thesystem memory 22 to the processing unit 21 when the system is in anoperational state. The system memory 22 can include read only memory(ROM) 24 and random access memory (RAM) 25. A basic input/output system26 (BIOS), containing the basic routines that help to transferinformation between elements within the computer 20, such as duringstart up, is stored in ROM 24. The system bus 23 may be any of severaltypes of bus structures including a memory bus or memory controller, aperipheral bus, or a local bus, which implements any of a variety of busarchitectures. Coupled to system bus 23 may be a direct memory access(DMA) controller 80 that is configured to read from and/or write tomemory independently of processing unit 21. Additionally, devicesconnected to system bus 23, such as storage drive I/F 32 or magneticdisk drive I/F 33 may be configured to also read from and/or write tomemory independently of processing unit 21, without the use of DMAcontroller 80.

The computer 20 may further include a storage drive 27 for reading fromand writing to a hard disk (not shown) or a solid-state disk (SSD) (notshown), a magnetic disk drive 28 for reading from or writing to aremovable magnetic disk 29, and an optical disk drive 30 for readingfrom or writing to a removable optical disk 31 such as a CD ROM or otheroptical media. The hard disk drive 27, magnetic disk drive 28, andoptical disk drive 30 are shown as connected to the system bus 23 by ahard disk drive interface 32, a magnetic disk drive interface 33, and anoptical drive interface 34, respectively. The drives and theirassociated computer-readable storage media provide non-volatile storageof computer readable instructions, data structures, program modules andother data for the computer 20. Although the example environmentdescribed herein employs a hard disk, a removable magnetic disk 29 and aremovable optical disk 31, it should be appreciated by those skilled inthe art that other types of computer readable media which can store datathat is accessible by a computer, such as flash memory cards, digitalvideo discs or digital versatile discs (DVDs), random access memories(RAMs), read only memories (ROMs) and the like may also be used in theexample operating environment. Generally, such computer readable storagemedia can be used in some embodiments to store processor executableinstructions embodying aspects of the present disclosure. Computer 20may also comprise a host adapter 55 that connects to a storage device 62via a small computer system interface (SCSI) bus 56.

A number of program modules comprising computer-readable instructionsmay be stored on computer-readable media such as the hard disk, magneticdisk 29, optical disk 31, ROM 24 or RAM 25, including an operatingsystem 35, one or more application programs 36, other program modules37, and program data 38. Upon execution by the processing unit, thecomputer-readable instructions cause actions described in more detailbelow to be carried out or cause the various program modules to beinstantiated. A user may enter commands and information into thecomputer 20 through input devices such as a keyboard 40 and pointingdevice 42. Other input devices (not shown) may include a microphone,joystick, game pad, satellite disk, scanner or the like. These and otherinput devices are often connected to the processing unit 21 through aserial port interface 46 that is coupled to the system bus, but may beconnected by other interfaces, such as a parallel port, game port oruniversal serial bus (USB). A display 47 or other type of display devicecan also be connected to the system bus 23 via an interface, such as avideo adapter 48. In addition to the display 47, computers typicallyinclude other peripheral output devices (not shown), such as speakersand printers.

The computer 20 may operate in a networked environment using logicalconnections to one or more remote computers, such as a remote computer49. The remote computer 49 may be another computer, a server, a router,a network PC, a peer device or other common network node, and typicallycan include many or all of the elements described above relative to thecomputer 20, although only a memory storage device 50 has beenillustrated in FIG. 1. The logical connections depicted in FIG. 1 caninclude a local area network (LAN) 51 and a wide area network (WAN) 52.Such networking environments are commonplace in offices, enterprise widecomputer networks, intranets and the Internet.

When used in a LAN networking environment, the computer 20 can beconnected to the LAN 51 through a network interface or adapter 53. Whenused in a WAN networking environment, the computer 20 can typicallyinclude a modem 54 or other means for establishing communications overthe wide area network 52, such as the INTERNET. The modem 54, which maybe internal or external, can be connected to the system bus 23 via theserial port interface 46. In a networked environment, program modulesdepicted relative to the computer 20, or portions thereof, may be storedin the remote memory storage device. It will be appreciated that thenetwork connections shown are exemplary and other means of establishinga communications link between the computers may be used.

In an embodiment where computer 20 is configured to operate in anetworked environment, OS 35 is stored remotely on a network, andcomputer 20 may netboot this remotely-stored OS rather than booting froma locally-stored OS. In an embodiment, computer 20 comprises a thinclient where OS 35 is less than a full OS, but rather a kernel that isconfigured to handle networking and display output, such as on monitor47.

Turning to FIG. 2, illustrated is an exemplary virtualization platformthat can be used to generate virtual machines. In this embodiment,microkernel hypervisor 202 can be configured to control and arbitrateaccess to the hardware of computer system 200. Microkernel hypervisor202 can generate execution environments called partitions such as childpartition 1 through child partition N (where N is an integer greaterthan 1). Here, a child partition is the basic unit of isolationsupported by microkernel hypervisor 202. Microkernel hypervisor 202 canisolate processes in one partition from accessing another partition'sresources. In particular, microkernel hypervisor 202 can isolate kernelmode code of a guest operating system from accessing another partition'sresources as well as user mode processes. Each child partition can bemapped to a set of hardware resources, e.g., memory, devices, processorcycles, etc., that is under control of the microkernel hypervisor 202.In embodiments, microkernel hypervisor 202 can be a stand-alone softwareproduct, a part of an operating system, embedded within firmware of themotherboard, specialized integrated circuits, or a combination thereof.

Microkernel hypervisor 202 can enforce partitioning by restricting aguest operating system's view of the memory in a physical computersystem. When microkernel hypervisor 202 instantiates a virtual machine,it can allocate pages, e.g., fixed length blocks of memory with startingand ending addresses, of system physical memory (SPM) to the virtualmachine as guest physical memory (GPM). Here, the guest's restrictedview of system memory is controlled by microkernel hypervisor 202. Theterm guest physical memory is a shorthand way of describing a page ofmemory from the viewpoint of a virtual machine and the term systemphysical memory is shorthand way of describing a page of memory from theviewpoint of the physical system. Thus, a page of memory allocated to avirtual machine will have a guest physical address (the address used bythe virtual machine) and a system physical address (the actual addressof the page).

A guest operating system operating in a virtual partition, operates muchthe same way that an operating system operates on a physical machine. Aguest operating system may virtualize guest physical memory through thesame virtual memory management techniques that an operating systemapplies to physical memory. Virtual memory management is a techniquethat allows an operating system to over commit memory and to give anapplication sole access to a logically contiguous working memory. Andjust as an operating system uses page tables in a physical environment,in a virtualized environment, a guest operating system can use one ormore page tables, called guest page tables in this context, to translatevirtual addresses, known as virtual guest addresses into guest physicaladdresses. In this example, a memory address may have a guest virtualaddress, a guest physical address, and a system physical address.

In the depicted example, parent partition component, which can also bethought of as similar to domain 0 of Xen's open source hypervisor caninclude a host environment 204. Host environment 204 can be an operatingsystem (or a set of configuration utilities) and host environment 204can be configured to provide resources to guest operating systemsexecuting in the child partitions 1-N by using virtualization serviceproviders 228 (VSPs). VSPs 228, which are typically referred to asback-end drivers in the open source community, can be used to multiplexthe interfaces to the hardware resources by way of virtualizationservice clients (VSCs) (typically referred to as front-end drivers inthe open source community or paravirtualized devices). As shown by thefigures, virtualization service clients execute within the context ofguest operating systems. However, these drivers are different than therest of the drivers in the guest in they communicate with hostenvironment 204 via VSPs instead of communicating with hardware oremulated hardware. In an exemplary embodiment the path used byvirtualization service providers 228 to communicate with virtualizationservice clients 216 and 218 can be thought of as the enlightened IOpath.

As shown by the figure, emulators 234, e.g., virtualized IDE devices,virtualized video adaptors, virtualized NICs, etc., can be configured torun within host environment 204 and are attached to emulated hardwareresources, e.g., IO ports, guest physical address ranges, virtual VRAM,emulated ROM ranges, etc. available to guest operating systems 220 and222. For example, when a guest OS touches a guest virtual address mappedto a guest physical address where a register of a device would be for amemory mapped device, microkernel hypervisor 202 can intercept therequest and pass the values the guest attempted to write to anassociated emulator. Here, the emulated hardware resources in thisexample can be thought of as where a virtual device is located in guestphysical address space. The use of emulators in this way can beconsidered the emulation path. The emulation path is inefficientcompared to the enlightened IO path because it requires more CPU time toemulate devices than it does to pass messages between VSPs and VSCs. Forexample, several actions on memory mapped to registers are required inorder to write a buffer to disk via the emulation path, while this maybe reduced to a single message passed from a VSC to a VSP in theenlightened IO path.

Each child partition can include one or more virtual processors (230 and232) that guest operating systems (220 and 222) can manage and schedulethreads to execute thereon. Generally, the virtual processors areexecutable instructions and associated state information that provide arepresentation of a physical processor with a specific architecture. Forexample, one virtual machine may have a virtual processor havingcharacteristics of an Intel x86 processor, whereas another virtualprocessor may have the characteristics of a PowerPC processor. Thevirtual processors in this example can be mapped to processors of thecomputer system such that the instructions that effectuate the virtualprocessors will be directly executed by physical processors. Thus, in anembodiment including multiple processors, virtual processors can besimultaneously executed by processors while, for example, otherprocessor execute hypervisor instructions. The combination of virtualprocessors and memory in a partition can be considered a virtualmachine.

Guest operating systems (220 and 222) can be any operating system suchas, for example, operating systems from Microsoft®, Apple®, the opensource community, etc. The guest operating systems can includeuser/kernel modes of operation and can have kernels that can includeschedulers, memory managers, etc. Generally speaking, kernel mode caninclude an execution mode in a processor that grants access to at leastprivileged processor instructions. Each guest operating system can haveassociated file systems that can have applications stored thereon suchas terminal servers, e-commerce servers, email servers, etc., and theguest operating systems themselves. The guest operating systems canschedule threads to execute on the virtual processors and instances ofsuch applications can be effectuated.

Referring now to FIG. 3, it illustrates an alternative virtualizationplatform to that described above in FIG. 2. FIG. 3 depicts similarcomponents to those of FIG. 2; however, in this example embodimenthypervisor 302 can include a microkernel component and componentssimilar to those in host environment 204 of FIG. 2 such as thevirtualization service providers 228 and device drivers 224, whilemanagement operating system 304 may contain, for example, configurationutilities used to configure hypervisor 302. In this architecture,hypervisor 302 can perform the same or similar functions as microkernelhypervisor 202 of FIG. 2; however, in this architecture hypervisor 304effectuates the enlightened IO path and includes the drivers for thephysical hardware of the computer system. Hypervisor 302 of FIG. 3 canbe a stand alone software product, a part of an operating system,embedded within firmware of the motherboard or a portion of hypervisor302 can be effectuated by specialized integrated circuits.

Referring now to FIG. 4, depicted is an embodiment of communicationsbetween child partitions and a parent partition. Hypervisor 202multiplexes the resources of processors 102 and RAM 104 among each ofthe hosted parent partition 402-P and child partitions 402-1 and 402-N.As shown, the parent partition 402-P has access to hardware devices 404in the computer system 400. The child partitions 402-1 and 402-N do nothave direct access to the devices 404. In order to utilize the devices404, a child partition must communicate its device request and anyassociated data to the parent partition 402-P which executes the devicerequest.

One way to communicate data between a parent partition 402-P and a childpartition is to provide each partition with a VM bus component whichallows each partition to read from and write to a shared memoryassociated with a particular child partition. For example, in FIG. 4.,parent partition 402-P has a VM bus component 410-P and child partition402-1 has a VM bus component 410-1. Shared memory 412-1 is associatedwith child partition 402-1 and facilitates the passage of data betweenparent partition 402-P and child partition 402-1. Shared memory 412-1can include one or more memory pages which are dedicated to storing datawhich is being passed between parent partition 402-P and child partition402-1. Each of parent partition 402-P and child partition 402-1 can readfrom and write to shared memory 412-1 using their respective VM buscomponents 410-P and 410-1. Similarly, child partition 402-N has a VMbus component 410-N and each of parent partition 402-P and childpartition 402-N can read from and write to shared memory 412-N usingtheir respective VM bus components 410-P and 410-N.

The configuration depicted in FIG. 4 allows for passage of data betweena parent partition and individual child partitions. However, asmentioned above, it is inefficient for each partition to constantlycheck shared memories to determine whether another partition has writtendata to the shaved memory. To avoid constant checking of shared memorieseach partition can be signaled when data is available to be read in ashared memory. For example, child partition 402-1 can write data toshared memory 412-1 for the data to be read by parent partition 402-P.However, without constant checking or being notified, parent partition402-P is not aware that child partition 402-1 has written data to theshared memory 412-1. Thus, to avoid constant checking of the sharedmemory by parent partition 402-P, it is advantageous to notify parentpartition 402-P that data is available to be read from shared memory412-1.

FIG. 4 depicts one approach to notifying a partition that data isavailable to be read in a shared memory. In this approach, after childpartition 402-1 writes data to shared memory 412-1, child partition402-1 sends a synthetic intercept signal 414 to hypervisor 202. Thesynthetic intercept signal 414 indicates that data is available inshared memory 412-1 to be read by parent partition 402-P. Interceptsignal 414 is synthetic in the sense that it is an intercept signalwhich child partition 402-1 would not send to hypervisor 202 if childpartition 402-1 did not need to notify hypervisor 202 that data isavailable in shared memory 412-1 to be read by parent partition 402-P.Once hypervisor 202 receives the intercept signal 414 from childpartition 402-1, hypervisor 202 sends a notification 416 to parentpartition 402-P. The notification 416 indicates that data is availableto be read in shared memory 412-1. After receiving the notification 416from hypervisor 202, parent partition 402-P reads the data from sharedmemory 412-1.

The reverse process of a parent partition sharing data with a childpartition, while not depicted in FIG. 4, is similar. For example, afterparent partition 402-P writes data to shared memory 412-1, parentpartition 402-P sends an intercept signal to hypervisor 202. Oncehypervisor 202 receives the intercept signal from parent partition402-P, hypervisor 202 sends a notification to child partition 402-1. Thenotification indicates that data is available to be read in sharedmemory 412-1. After receiving the notification from hypervisor 202,child partition 402-1 reads the data from shared memory 412-1.

The notification process depicted in FIG. 4 is efficient in that itquickly notifies parent partition 402-P when data from child partition402-1 is available to be read in shared memory 412-1. However, thisnotification process may be an inefficient use of the resources ofcomputing system 400. For example, this notification process requires anintercept signal to be sent to hypervisor 202 every time that data iswritten to a shared memory by one of the partitions. This can result ina large number of intercepts being sent to the hypervisor 202,increasing the workload of the hypervisor 202 and potentially delayingother processes performed by the hypervisor 202, such as multiplexingthe resources of processors 102 and RAM 104 among each of thepartitions. This notification process can also be inefficient becausethe hypervisor 202 cannot differentiate between the priority of any ofthe intercept signals which indicate that data is available in a sharedmemory. Since the sending of an intercept signal from a partition tohypervisor 202 is the only way that the data in a shared memory will beread, the hypervisor 202 cannot tell whether individual interceptsignals have a high priority or a low priority. Because it is costly tosend the initial synthetic intercept to the hypervisor from thepartition that writes data to a shared memory, it would be advantageousto avoid sending the synthetic intercept. As described below, thesynthetic intercept can be avoided by merely writing data to the sharedmemory and allowing the hypervisor to determine that the data has beenwritten on its own.

Referring now to FIG. 5, depicted is another configuration and methodfor notifying a partition that data is available to be read in a sharedmemory. As shown, computer system 500 includes hardware devices 404,processor(s) 102, RAM 104, a hypervisor 202, partitions 402-P, 402-1,and 402-N, and shared memories 412-1 and 412-N which are similar tocorresponding components discussed above with respect to computingsystem 400. Computer system 500 also includes monitor pages 510 whichare managed by hypervisor 202. Monitor pages include an input monitormemory page and an output monitor memory page for each child partition.As shown in FIG. 5, the monitor pages 510 include an input monitormemory page 512-1 and an output monitor memory page 514-1 associatedwith child partition 402-1, and an input monitor memory page 512-N andan output monitor memory page 514-N associated with child partition402-N.

In the configuration depicted in FIG. 5, a partition that writes data toa shared memory uses the monitor pages 510 to signal that data isavailable to be read in a shared memory. For example, after childpartition 402-1 writes data to shared memory 412-1, child memorymodifies output monitor memory page 514-1 to indicate that data isavailable in shared memory 412-1 to be read by parent partition 402-P.The hypervisor 202 periodically checks each of the monitor pages 510.When checking each of the monitor pages 510, hypervisor 202 determinesthat output monitor memory page 514-1 indicates that data is availablein shared memory 412-1 to be read by parent partition 402-P. Hypervisor202 then sends a notification 520 to parent partition 402-P. Thenotification 520 indicates that data is available in shared memory 412-1to be read by parent partition 402-P. After receiving the notification520, parent partition 402-P reads the data is shared memory 412-1 andcan then modifies output monitor memory page 514-1 so that it does notindicate that data is available in shared memory 412-1 to be read byparent partition 402-P.

It is important to note that each of the monitor pages 510 is equallytreated by the hypervisor. For example, if a particular highly likelyevent, such as a halt operation from one partition, were to occur, thehypervisor would not be able to target the particular one of the monitorpages 510 corresponding to the partition that initiated the event. Thus,the hypervisor cannot selectively determine which of the shared pages510 it should inspect first to determine if new data is available to beread. Instead, the hypervisor would need to cycle through all of themonitor pages 510 or wait until the next time that is it scheduled tocheck the monitor pages 510. Such a process can be inefficient as itintroduces latency and unnecessary cycles to check monitor pages 510.

In the reverse direction, which is not depicted in FIG. 5, parentpartition 402-P writes data for child partition 402-1 in shared memory412-1 and then changes input monitor memory page 512-1 to indicate thatdata is available in shared memory 412-1 to be read by child partition402-1. When checking each of the monitor pages 510, hypervisor 202determines that input monitor memory page 512-1 indicates that data isavailable in shared memory 412-1 to be read by child partition 402-1.Hypervisor then sends a notification to child partition 402-1. Thenotification that data is available to be read in shared memory 412-1.After receiving the notification, child partition 402-1 reads the datais shared memory 412-1 and modifies input monitor memory page 512-1 sothat it does not indicate that data is available in shared memory 412-1to be read by parent partition 402-P.

The hypervisor 202 manages monitor pages 510 as a collection of pages.Each time the hypervisor checks the monitor pages 510, it checks each ofthe input pages 512-1 and 512-N and each of the output pages 514-1 and514-N for each of the child partitions 402-1 and 402-N. In other words,the each time the hypervisor checks the monitor pages 510, it checkstwice as many pages as there are child partitions operating in computingsystem 500. This system is advantageous in that it does not require thatan intercept be sent to the hypervisor 202 each time that a partitionwrites data to a shared memory. However, hypervisor 202 does not haveany indication of which of the monitor pages 510 is likely to indicatethat data is available to be read in a shared memory. Thus, each timethat it checks monitor pages 510, hypervisor individually checks all ofthe input pages 512-1 and 512-N and all of the output pages 514-1 and514-N.

The approach depicted in FIG. 5 may have some advantages over theapproach of each partition sending intercept signals to the hypervisoreach time that a partition write data to a shared memory. However, theuse of shared pages 510 also has some disadvantages. For example,hypervisor 202 individually checks both an input page and an output pagefor each child partition each time that it checks monitor pages 510.Depending on the number of child partitions that are hosted in computingsystem 500 and the frequency with which hypervisor 202 checks monitorpages 510, the checking of all of the monitor pages 510 can be a burdenon hypervisor 202 and can slow the other processes carried out by thehypervisor 202. Furthermore, there is an inherent latency between thetime that a partition writes data to shared memory and the time thathypervisor 202 performs the next check of the shared monitor pages.Thus, the use of shared monitor pages places in conflict the desire tohave monitor pages 510 frequently checked by hypervisor 202 and thedesire not to overburden hypervisor 202 with frequent checking ofmonitor page 510.

Referring now to FIG. 6, depicted is an embodiment of the presentinvention for notifying a partition that data is available to be read ina shared memory. As shown, computer system 600 includes hardware devices404, processor(s) 102, RAM 104, a hypervisor 202, partitions 402-P,402-1, and 402-N, and shared memories 412-1 and 412-N which are similarto corresponding components discussed above with respect to computingsystem 400. Computer system 600 also includes a trigger pages associatedwith each of the child partitions operating in computer system 600.Computer system 600 may also include instructions for hypervisor 202 toaccess pages 610-1 and 610-N. Trigger page 610-1 can be located in thesame memory as shared memory 412-1, in a memory separate from sharedmemory 412-1, as part of shared memory 412-1, or any other location.Trigger page 610-1 includes an input portion 612-1 and an output portion614-1. Input portion 612-1 of trigger page 610-1 indicates whether datais available to be read by child partition 402-1. Output portion 614-1of trigger page 610-1 indicates whether data is available to be read byparent partition 402-P. Trigger page 610-N is associated with childpartition 402-N and includes an input portion 612-N and an outputportion 614-N similar to trigger page 610-1 discussed above. In oneembodiment, each of the trigger pages 610-1 and 610-N is associated withonly child partition.

In this configuration, when child partition 402-1 writes data to sharedmemory 412-1 to be read by parent partition 402-P, it also modifies theoutput portion 614-1 of trigger page 610-1 to indicate that data isavailable in shared memory 412-1 to be read by parent partition 402-P.Similarly, when parent partition 402-P writes data to shared memory412-1 to be read by child partition 402-1, it also modifies the inputportion 612-1 of trigger page 610-1 to indicate that data is availablein shared memory 412-1 to be read by child partition 402-1. The triggerpage 610-1 provides a flag indicating when data is available in sharedmemory 412-1 to be read by either parent partition 402-P or childpartition 402-1. Similar operations are used with respect to triggerpage 610-N when parent partition 402-P and child partition 402-P writeto shared memory 612-N.

Referring now to FIG. 7, depicted is a method for notifying a partitionin computing system 600 that data is available to be read in a sharedmemory. Child partition sends 710 a system event signal 620 tohypervisor 202. A system event signal, as opposed to an interceptsignal, is a signal that would be send from the child partition 402-1 tothe hypervisor 202 regardless of whether child partition 402-1 hadwritten any data to shared memory 412-1 or modified the output portion614-1 of the trigger page 610-1. Examples of system event signalsinclude virtual processor halt signals and timeslice end signals. Systemevent signals themselves do not indicate whether data is available in ashared memory. However, the receipt of a system event signal from achild partition may be an appropriate time to check the trigger pageassociated with that child partition. For example, if child partition402-1 writes a network I/O request to shared memory 412-1 and modifiesthe output portion 614-1 of trigger page 610-1. At some later point,child partition may halt and send a virtual processor halt signal to thehypervisor 202 because it is waiting for a response to the network I/Orequest from parent partition 402-P. Thus, the receipt of the haltsystem event signal from child partition 402-1 is an appropriate timefor hypervisor 202 to check trigger page 610-1 to determine whether datais available in the shared memory 612-1 to be read by one of thepartitions.

In response to receiving the system event 620 from child partition402-1, hypervisor 202 accesses 720 trigger page 610-1 associated withchild partition 402-1. Hypervisor 202 determines 730 whether the outputportion 614-1 of trigger page 610-1 indicates that data is available inshared memory 412-1 to be read by parent partition 402-P. Hypervisor 202also determines 740 whether the input portion 612-1 of trigger page610-1 indicates that data is available in shared memory 412-1 to be readby child partition 402-1.

If the hypervisor 202 determines that the output portion 614-1 oftrigger page 610-1 indicates that data is available in shared memory412-1 to be read by parent partition 402-P, hypervisor 202 sends 732 anotification to parent partition 402-P indicating that data is availableto be read in shared memory 412-1. Parent partition then reads 734 datafrom shared memory 412-1 and modifies 734 the output portion 614-1 oftrigger page 610-1 associated with the child partition 402-1 to indicatethat data is not available in shared memory 412-1 to be read by parentpartition 402-P. If the hypervisor 202 determines that the input portion612-1 of trigger page 610-1 indicates that data is available in sharedmemory 412-1 to be read by child partition 402-1, hypervisor 202 sends742 a notification to child partition 402-1 indicating that data isavailable to be read in shared memory 412-1. Child partition then reads744 data from shared memory 412-1 and modifies 744 the input portion614-1 of trigger page 610-1 associated with the child partition 402-1 toindicate that data is not available in shared memory 412-1 to be read bychild partition 402-1.

The maintenance of a single trigger page associated with each childpartition in computer system 600 allows the hypervisor 202 toselectively access particular trigger pages in response to receivingparticular system events from child partitions. The receipt of a systemevent from a child partition may be an appropriate trigger for thehypervisor to check the trigger page associated with that childpartition. Using the system event as a trigger can also reduce thelatency found in computing system 500 without requiring the childpartition to send an intercept signal to the hypervisor 202, as is donein computing system 400. While computing system 600 would still permit achild partition to send an intercept signal to hypervisor 202, such asin the case of high priority requests, and computing system 600 wouldstill permit the hypervisor 202 to periodically check all of the triggerpages on a periodic basis, using system events from a child partition asa trigger to check a trigger page for that child partition can reducethe latency in notifying the parent partition of available data to beread without overburdening the hypervisor with intercepts.

Referring now to FIG. 8 is another aspect of the present invention. Asshown, child partition 402-1 writes 810 data to the shared memory 412-1.After writing the data to the shared memory 412-1, child partition 402-1accesses 820 the output portion 614-1 of trigger page 610-1 anddetermines 830 whether output portion 614-1 of trigger page 610-1indicates that data is available in shared memory 412-1 to be read byparent partition 402-P. If child partition 402-1 determines that outputportion 614-1 of trigger page 610-1 does not indicate that data isavailable in shared memory 412-1 to be read by parent partition 402-P,child partition 402-1 modifies 840 output portion 614-1 of trigger page610-1 to indicate that data is available in shared memory 412-1 to beread by parent partition 402-P. In one embodiment, while the parentpartition 402-P is handling a trigger to read data from shared memory412-1, the hypervisor will ignore any additional trigger signals fromthe child partition 402-1 until the parent partition 402-P has read allof the data in shared memory 412-1 and the trigger page 610-1 becomesavailable for new triggers. Similarly, while the parent partition 402-1is handling a trigger to read data from shared memory 412-1, thehypervisor will ignore any additional trigger signals from the parentpartition 402-P.

Using the process depicted in FIG. 8, child partition 402-1 can batchmultiple sets of data for reading by parent partition 402-P. Forexample, child partition 402-1 writes a first set of data to sharedmemory 412-1 and accesses the output portion 614-1 of trigger page610-1. Child partition 402-1 determines that output portion 614-1 oftrigger page 610-1 does not indicate that data is available in sharedmemory 412-1 to be read by parent partition 402-P, and child partition402-1 modifies output portion 614-1 of trigger page 610-1 to indicatethat data is available in shared memory 412-1 to be read by parentpartition 402-P. Before parent partition 402-P read the first set ofdata and modifies the output portion 614-1 of trigger page 610-1, childpartition 402-1 then writes a second set of data to shared memory 412-1and accesses the output portion 614-1 of trigger page 610-1. Sinceparent partition 402-P has not yet read the data in shared memory 412-1and modified the output portion 614-1 of trigger page 610-1, childpartition 402-1 determines that output portion 614-1 of trigger page610-1 still indicates that data is available in shared memory 412-1 tobe read by parent partition 402-P. Therefore, child partition does notmodify output portion 614-1 of trigger page 610-1 after writing thesecond set of data to shared memory 412-1. When parent partition 402-Preads the data in shared memory 412-1, it will read both the first setof data and the second set of data.

In another example, child partition 402-1 writes a first set of data toshared memory 412-1 and accesses the output portion 614-1 of triggerpage 610-1. Child partition 402-1 determines that output portion 614-1of trigger page 610-1 does not indicate that data is available in sharedmemory 412-1 to be read by parent partition 402-P, and child partition402-1 modifies output portion 614-1 of trigger page 610-1 to indicatethat data is available in shared memory 412-1 to be read by parentpartition 402-P. Child partition 402-1 sends a system event signal 620to hypervisor 202 which accesses output portion 614-1 of trigger page610-1 and sends a notification to parent partition indicating that datais available to be read in shared memory 412-1. Parent partition beginsto read the first set of data in the shared memory when child partition402-1 writes a second set of data to shared memory 412-1. After writingthe second set of data to shared memory 412-1, child partition 402-1accesses the output portion 614-1 of trigger page 610-1. Since parentpartition 402-P has not finished reading the data in shared memory412-1, it has not yet modified output portion 614-1 of trigger page610-1. Therefore, because output portion 614-1 of trigger page 610-1still indicates that data is available in shared memory 412-1 to be readby parent partition 402-P, child partition does not modify outputportion 614-1 of trigger page 610-1 after writing the second set ofdata. Parent partition 402-P continues reading all of the data availablein shared memory 412-1, including both the first set of data and thesecond set of data, and then parent partitions 402-P modifies outputportion 614-1 of trigger page 610-1 to indicate that data is notavailable in shared memory 412-1 to be read by parent partition 402-P.

Referring now to FIG. 9, depicted is another embodiment of the presentinvention. Hypervisor 202 identifies 910 a trigger event in computersystem 600. The trigger event can be a system event sent by parentpartition 402-1, an intercept sent by any of the partitions, a hardwareevent (e.g., the powering down of one or more processor(s) 102, anoperation of one of devices 404), or any other similar event. Inresponse to identifying the system event, the hypervisor 202 accesses920 each trigger page 610-1 and 610-N in the computing system 600.Hypervisor 202 determines 930 whether any output portion 614-1 and 614-Nof trigger pages 610-1 and 610-N indicates that data is available in anyof shared memories 412-1 and 412-N to be read by parent partition 402-P.Hypervisor 202 also determines 740 whether any input portion 612-1 and612-N of trigger pages 610-1 and 610-N indicates that data is availablein shared memories 412-1 and 412-N to be read by any of child partitions402-1 and 402-N.

If the hypervisor 202 determines that any output portion 614-1 and 614-Nof trigger pages 610-1 and 610-N indicates that data is available in anyof shared memories 412-1 and 412-N to be read by parent partition 402-P,hypervisor 202 sends 932 a notification to parent partition 402-Pindicating which of shared memories 412-1 and 412-N has data availableto be read. Parent partition then reads 934 data from each shared memory412-1 and 412-N that has data available to be read and modifies 934 thecorresponding output portions 614-1 and 614-N of trigger pages 610-1 and610-N. If the hypervisor 202 determines that any input portion 612-1 and612-N of trigger pages 610-1 and 610-N indicates that data is availablein shared memories 412-1 and 412-N to be read by any of child partitions402-1 and 402-N, hypervisor 202 sends 942 a notification to those childpartitions 402-1 and 402-N for which data is available to be read inshared memories 412-1 and 412-N. Those child partitions 402-1 and 402-Nthat receive a notification from hypervisor 202 then read 944 data fromtheir corresponding shared memories 412-1 and 412-N and modify 944 thecorresponding input portions 614-1 and 614-N of trigger pages 610-1 and610-N to indicate that data is not available in shared memories 412-1and 412-N to be read by child partitions 402-1 and 402-N.

The trigger events identified by the hypervisor can be any type of eventin the computer system 600. Preferably, the hypervisor would identifytrigger events that would cause loss of data or function. For example,if one of devices 404 were about to be disengaged, an indication thatthe device was about to be disengaged may be a trigger event. Thehypervisor may identify this trigger event and respond by checking allof the trigger pages in the system. This will allow any outstanding datato be cleared out of shared memories so that any outstanding related tothe device can be completed before the device is disengaged.

The foregoing detailed description has set forth various embodiments ofthe systems and/or processes via examples and/or operational diagrams.Insofar as such block diagrams, and/or examples contain one or morefunctions and/or operations, it will be understood by those within theart that each function and/or operation within such block diagrams, orexamples can be implemented, individually and/or collectively, by a widerange of hardware, software, firmware, or virtually any combinationthereof.

While particular aspects of the present subject matter described hereinhave been shown and described, it will be apparent to those skilled inthe art that, based upon the teachings herein, changes and modificationsmay be made without departing from the subject matter described hereinand its broader aspects and, therefore, the appended claims are toencompass within their scope all such changes and modifications as arewithin the true spirit and scope of the subject matter described herein.

What is claimed:
 1. A method for use in a computing system, thecomputing system having operating thereon a parent partition, aplurality of child partitions, and a hypervisor, wherein each of theplurality of child partitions has associated therewith a shared memoryand a trigger page, the method comprising: receiving, by the hypervisor,a system event signal sent by a first child partition, the first childpartition being one of the plurality of child partitions; accessing, bythe hypervisor, a trigger page associated with the first child partitionin response to receiving the system event; and determining whether thetrigger page indicates that a shared memory associated with the firstchild partition contains data to be read by one of a group consisting ofthe parent partition and the first child partition.